The Handblade Observer script is a script that can be added onto GameObjects that you would like to detect when a handblade is present within the area of the GameObject.
The HandbladeObserver script requires the Gameboard GameObject to be present. Find the Gameboard menu at the top of the unity header and click "Add SDK" to add the Gameboard GameObject to your project. If you do not have the Gameboard menu options, see Gameboard SDK Access
First, select all the GameObjects you would like to know when a handblade is present within it's bounds.
Next, find the Gameboard menu at the top of the unity header and click "Add Handblade Observer" to add the HandbladeObserver to your GameObject(s).
This will add a the script to the gameobjects, and you will see a red gizmo indicating the area where the handblade will be detected.
Now that GameObject is able to quickly notify when a handblade is within an area!
You will notice the Handblade Observer Script has a few customizable options.
There are various events that you can use to keep track of physical token pairing and paired token locations:
Properties: GameboardShape
shape
Properties: GameboardShape
shape, bool
withinArea
Properties: GameboardShape
piece
NOTE The GameboardShape
used to represent the Handblade will include an angle
property, and that angle indicates the ‘forward' angle in radians. The ‘forward' for a handblade is pointing towards what is considered inside the hand.